<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>绑定新手机号码</title>
    <meta content="yes" name="apple-mobile-web-app-capable"><!-- 这meta的作用就是删除默认的苹果工具栏和菜单栏允许全屏模式浏览-->
    <meta name="apple-touch-fullscreen" content="yes"><!-- 开启对web app程序的支持  -->
    <meta content="telephone=no,email=no" name="format-detection"><!-- iPhone会自动把你这个文字加链接样式、并且点击这个数字还会自动拨号！telephone=no就忽略页面中的数字识别为电话号码 ,email=no 忽略识别邮箱 -->
    <!--base css-->
    <link rel="stylesheet" href="CSS/reset.css"/>
    <link rel="stylesheet" href="CSS/index.css"/>
    <link rel="stylesheet" href="FONT/iconfont.css"/>
    <!--base css end-->
    <!--base js-->
    <!--<meta content="yes" name="apple-mobile-web-app-capable">-->
    <script>
        window.scrollTo(0, 0);
    </script>
    <!--<meta content="yes" name="apple-mobile-web-app-capable"> end-->
    <script src="JS/reset.js"></script>
    <script src="JS/jquery.min.js"></script>
    <script src="JS/zepto.min.js"></script>
    <script src="JS/TouchSlide.js"></script>
    <script src="JS/notice.js"></script>
    <script src="JS/screen.js"></script>
    <script src="JS/back.js"></script>
    <!--base js end-->
    <!--no base js-->
    <script src="JS/kuaisudenglu.js"></script>
    <!--no base js end-->


</head>
<body>
<!--wapper-->
<div class="wapper">
    <!--header-->
    <div class="header">
        <div class="header-list bag-1462c4">
            <div class="p-l-25 p-r-25 relative text-center f33">
                <a href="javascript:history.go(-1)" class="block"><i class="icon iconfont">&#xe643;</i></a>
                <a href="{:U('Index/index')}" class="home"><i class="icon iconfont f-b">&#xe61a;</i></a>
                <a href="javascript:;" class="text-fff">绑定新手机号码</a>
            </div>
        </div>
    </div>
    <!--header end-->
    <!--content-->
    <div class="content">
        <div class="zhuce-list p-l-25 p-r-25">
<form action="{:U('Index/get_phone')}" method="post">
            <div class="denglu">
                <div class="dengluinput m-t-33 m-b-33">
            
                        <input type="hidden" name="type" value="2">
                        <div class="denglutit relative">
                            <input type="text" name="phone" value="" placeholder="手机号" style="width: 67%" class="dlphone"/>
                            <a href="javascript:;" class="huqu">获取验证码</a>
                        </div>
                        <div class="denglutit">
                            <input type="text" name="yzm" value="" id="get_yan" placeholder="请输入验证码"/>
                        </div>     
                </div>
                    <div class="lu">
                    <a href="#" class="denglusub" style="background:#ccc">保存</a>
                    <!-- <input type="submit" value="保存" class="denglusub sub" > -->
                    </div>
            </div>
            
        </div>
       <script>
        $(document).ready(function(){
            $(".huqu").click(function(){
                 var value=$(".huqu").text();
                 var telphone=$('.dlphone').val();
                  if(value == "获取验证码" && telphone !=""){
                    $.post("{:U('Index/edit_phone_add')}",{type:1,phone:telphone},function(data){});
                  }
             });
        //时时验证
            $('#get_yan').bind('input propertychange', function() {
             var get_yan = $('#get_yan').val();
            var cd=$('#get_yan').val().length;
            if(cd ==6){
             //验证码等于四位时再发送一次验证
            $.post("{:U('Index/check_edit_phone_add')}",{type:12,yzm:get_yan},function(data){
                  if(data ==1){
                   $(".lu").html('<input type="submit" value="保存" class="denglusub sub" >');
                  }else{
                   $(".lu").html('<a href="#" class="denglusub" style="background:#ccc">保存</a>');
                  }

            });
               }

                });


         });
    </script> 
        <!--content end-->


</form>
    </div>
</div>
    <!--wapper end-->
</body>
</html>